package com.jic.product.controller.rest;

import com.jic.common.base.vo.RestResult;
import com.jic.market.request.ProductOrderRestRequest;
import com.jic.market.response.ProductOrderRestResponse;
import com.jic.product.service.ProductOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by HeJun on 2020/1/18
 *
 * @Description:
 */
@Api(value = "API-商品下单管理", tags = "API-商品下单管理")
@RestController
@RequestMapping("/productOrderRest")
@Slf4j
public class ApiProductOrder {

    @Autowired
    ProductOrderService productOrderService;

    /**
     * @Author: Puxigui
     * @param:
     * @Description: 订单确认下单数据计算
     * @Date: 16:53 2020/11/28
     */
    @ApiOperation(value = "订单确认下单数据计算")
    @RequestMapping(value = "/orderConfirmInfo")
    public RestResult<ProductOrderRestResponse> orderConfirmInfo(@RequestBody ProductOrderRestRequest productOrderRestRequest) {
        return RestResult.success(productOrderService.orderConfirmInfo(productOrderRestRequest));
    }
}
